package com.aaa.service.impl;

import com.aaa.commen.domain.OperateLog;
import com.aaa.commen.entity.Result;
import com.aaa.commen.query.OperateLogQuery;
import com.aaa.mapper.OperateLogMapper;
import com.aaa.service.IOperateLogService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @PackageName: com.aaa.service.impl
 * @ClassName: IOperateLogServiceImpl
 * @Description:
 * @author: 王嘉威
 * @Date: 2021/3/2 15:56
 */
@Service
public class OperateLogServiceImpl extends ServiceImpl<OperateLogMapper, OperateLog> implements IOperateLogService {

    @Autowired
    private OperateLogMapper operateLogMapper;

    @Override
    public Result queryOperateLogInfo(OperateLogQuery operateLogQuery) {
        IPage<OperateLog> operateLogIPage = operateLogMapper.queryOperateLogInfo(new Page<OperateLog>(operateLogQuery.getCurrPage(), operateLogQuery.getCount()), operateLogQuery);
        return Result.success(operateLogIPage);
    }
}
